﻿<Window x:Class="DeliveryRoomStatusManage.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
        xmlns:local="clr-namespace:DeliveryRoomStatusManage"
        Title="MainWindow"
        WindowStartupLocation="CenterScreen" Height="768" Width="1024" Loaded="Window_Loaded" >

    <Window.Resources>
        <Style x:Key="itemStyle" TargetType="{x:Type ListBoxItem}">
            <Style.Setters>
                <Setter Property="Margin" Value="10,10,0,0"/>
                <Setter Property="Width" Value="1050"/>
            </Style.Setters>
            <Style.Resources>
                <!--SelectedItem with focus-->
                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#FF0475C9" />
                <!--SelectedItem without focus-->
                <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}"  Color="Transparent" />
            </Style.Resources>
        </Style>
        <LinearGradientBrush x:Key="Bule" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF28B1F9" Offset="0.3"/>
            <GradientStop Color="White"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="Green" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="White" Offset="0"/>
            <GradientStop Color="#FF87CC48" Offset="0.3"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="Red" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFF9634F" Offset="0.3"/>
            <GradientStop Color="White"/>
        </LinearGradientBrush>
        <Style x:Key="LabelStyle" TargetType="{x:Type Label}">
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Padding" Value="5"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Label}">
                        <Border CornerRadius="20" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <SolidColorBrush x:Key="ListBorder" Color="#828790"/>
        <!--<Style x:Key="ListBoxStyle" TargetType="{x:Type ListBox}">
            <Setter Property="Background" Value="#FF0475C9"/>
            <Setter Property="BorderBrush" Value="{StaticResource ListBorder}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
            <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
            <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
            <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
            <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBox}">
                        <Border x:Name="Bd" CornerRadius="15" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="1" SnapsToDevicePixels="true">
                            <ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}">
                                <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                            </ScrollViewer>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                            </Trigger>
                            <Trigger Property="IsGrouping" Value="true">
                                <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>-->

    </Window.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="60"/>
            <RowDefinition Height="120"/>
            <RowDefinition Height="650*"/>
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="482*"/>
            <ColumnDefinition Width="100*"/>
            <ColumnDefinition Width="100*"/>
            <ColumnDefinition Width="100*"/>
            <ColumnDefinition Width="100*"/>
            <ColumnDefinition Width="100*"/>
            <ColumnDefinition Width="100*"/>
            <ColumnDefinition Width="100*"/>
        </Grid.ColumnDefinitions>

        <Grid Grid.Column="1" Grid.Row="1"   VerticalAlignment="Center" HorizontalAlignment="Center">
            <Grid.RowDefinitions>
                <RowDefinition Height="60"/>
                <RowDefinition/>
                <RowDefinition Height="20"/>
            </Grid.RowDefinitions>
            <Image x:Name="image_1"  Margin="0" Height="60" Width="60"/>
            <TextBlock Text="产房负责人" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
            <TextBlock x:Name="tb_Name1" MouseLeftButtonUp="tb_Name1_MouseLeftButtonUp" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
            <TextBox x:Name="edit_Name1" KeyDown="edit_Name1_KeyDown" Grid.Row="2" Visibility="Collapsed"   HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="12"/>
        </Grid>
        <Grid Grid.Column="2" Grid.Row="1"   VerticalAlignment="Center">
            <Grid.RowDefinitions>
                <RowDefinition Height="60"/>
                <RowDefinition/>
                <RowDefinition Height="20"/>
            </Grid.RowDefinitions>
            <Image x:Name="image_2" Margin="0" Height="60" Width="60"/>
            <TextBlock Text="护士长" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
            <TextBlock x:Name="tb_Name2" MouseLeftButtonUp="tb_Name2_MouseLeftButtonUp" Grid.Row="2" Text="李某某" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
            <TextBox x:Name="edit_Name2"  KeyDown="edit_Name2_KeyDown" Visibility="Collapsed" Grid.Row="2" Text="" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="12"/>
        </Grid>
        <StackPanel Grid.Column="3" Grid.Row="1"   VerticalAlignment="Center">
            <Image x:Name="image_3" Margin="0" Height="60" Width="60"/>
            <TextBlock Text="待产组长" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
            <TextBlock x:Name="tb_Name3" MouseLeftButtonUp="tb_Name3_MouseLeftButtonUp" Grid.Row="2" Text="李某某" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
            <TextBox x:Name="edit_Name3" KeyDown="edit_Name3_KeyDown"   Visibility="Collapsed" Grid.Row="2" Text="" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="12"/>
        </StackPanel>
        <Grid Grid.Column="4" Grid.Row="1"   VerticalAlignment="Center">
            <Grid.RowDefinitions>
                <RowDefinition Height="60"/>
                <RowDefinition/>
                <RowDefinition Height="20"/>
            </Grid.RowDefinitions>
            <Image x:Name="image_4" Margin="0" Height="60" Width="60"/>
            <TextBlock Text="助产士" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
            <TextBlock x:Name="tb_Name4" MouseLeftButtonUp="tb_Name4_MouseLeftButtonUp" Grid.Row="2" Text="李某某" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
            <TextBox x:Name="edit_Name4" KeyDown="edit_Name4_KeyDown" Visibility="Collapsed" Grid.Row="2" Text="" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="12"/>
        </Grid>
        <Grid Grid.Column="5" Grid.Row="1"   VerticalAlignment="Center">
            <Grid.RowDefinitions>
                <RowDefinition Height="60"/>
                <RowDefinition/>
                <RowDefinition Height="20"/>
            </Grid.RowDefinitions>
            <Image x:Name="image_5"  Margin="0" Height="60" Width="60"/>
            <TextBlock Text="当班医生" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
            <TextBlock x:Name="tb_Name5" MouseLeftButtonUp="tb_Name5_MouseLeftButtonUp"  Grid.Row="2" Text="李某某" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
            <TextBox x:Name="edit_Name5" KeyDown="edit_Name5_KeyDown"   Visibility="Collapsed" Grid.Row="2" Text="" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="12"/>
        </Grid>
        <Grid Grid.Column="6" Grid.Row="1"   VerticalAlignment="Center">
            <Grid.RowDefinitions>
                <RowDefinition Height="60"/>
                <RowDefinition/>
                <RowDefinition Height="20"/>
            </Grid.RowDefinitions>
            <Image x:Name="image_6" Margin="0" Height="60" Width="60"/>
            <TextBlock Text="儿科医生" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
            <TextBlock x:Name="tb_Name6" MouseLeftButtonUp="tb_Name6_MouseLeftButtonUp"  Grid.Row="2" Text="李某某" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
            <TextBox x:Name="edit_Name6" KeyDown="edit_Name6_KeyDown"  Visibility="Collapsed" Grid.Row="2" Text="" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="12"/>
        </Grid>
        <Grid Grid.Column="7" Grid.Row="1"   VerticalAlignment="Center">
            <Grid.RowDefinitions>
                <RowDefinition Height="60"/>
                <RowDefinition/>
                <RowDefinition Height="20"/>
            </Grid.RowDefinitions>
            <Image x:Name="image_7" Source="Image/icon.png" Margin="0" Height="60" Width="60"/>
            <TextBlock Grid.Row="1" Text="麻醉师" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
            <TextBlock x:Name="tb_Name7" MouseLeftButtonUp="tb_Name7_MouseLeftButtonUp" Grid.Row="2" Text="李某某"  HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
            <TextBox x:Name="edit_Name7" KeyDown="edit_Name7_KeyDown" Grid.Row="2"    Visibility="Collapsed"  Text="" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
        </Grid>

        <Border Background="#FF0475CB" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="10">
            <StackPanel Orientation="Horizontal" >
                <Image Source="Image/妇幼logo.png" Margin="20,5,5,5"/>
                <StackPanel HorizontalAlignment="Left">
                    <TextBlock Text="Delivery Room Announcement" TextWrapping="Wrap"  Foreground="White" FontSize="18" FontFamily="Microsoft YaHei UI" FontWeight="Bold" VerticalAlignment="Center" Margin="5,10,0,0" />
                    <TextBlock x:Name="tbHosName" Text="省妇幼产房产妇状态公告栏" TextWrapping="Wrap"  Foreground="White" FontSize="12" FontFamily="Microsoft YaHei UI" FontWeight="Bold" VerticalAlignment="Bottom" Margin="5,5,0,0" HorizontalAlignment="Left" />
                </StackPanel>
            </StackPanel>
        </Border>
        <ListBox x:Name="listboxdata" Grid.Row="2" ItemContainerStyle="{StaticResource itemStyle}" BorderBrush="#FF0475CB" BorderThickness="1" Margin="15,10" Grid.ColumnSpan="10"   >
            <ListBox.Template>
                <ControlTemplate TargetType="{x:Type ListBox}"  >
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled">
                        <WrapPanel Orientation="Horizontal" IsItemsHost="True"
                               Background="#FF0475C9"
                               ScrollViewer.HorizontalScrollBarVisibility="Auto" 
                               ScrollViewer.VerticalScrollBarVisibility="Visible"
                               ScrollViewer.CanContentScroll="True"
                               ScrollViewer.PanningMode="Both"
                               Stylus.IsFlicksEnabled="True"/>
                    </ScrollViewer>
                    
                </ControlTemplate>
            </ListBox.Template>
        </ListBox>

    </Grid>
</Window>
